D:\git\skunkworks\herald-for-cpp\herald\include\herald\analysis\sensor_source.h
Line | Count | Source (jump to first uncovered line) |
1 | | // Copyright 2021 Herald Project Contributors |
2 | | // SPDX-License-Identifier: Apache-2.0 |
3 | | // |
4 | | |
5 | | #ifndef HERALD_ANALYSIS_SENSOR_SOURCE_H |
6 | | #define HERALD_ANALYSIS_SENSOR_SOURCE_H |
7 | | |
8 | | #include "sampling.h" |
9 | | #include "../datatype/rssi.h" |
10 | | |
11 | | namespace herald { |
12 | | namespace analysis { |
13 | | |
14 | | using namespace sampling; |
15 | | |
16 | | /// \brief Connects the RSSI readings from a SensorDelegate to a source for AnalysisRunner data |
17 | | template <typename RunnerT> |
18 | | struct SensorDelegateRSSISource { |
19 | | |
20 | | // Must delete for GCC 8/9. See https://stackoverflow.com/questions/63812165/stdvariant-requires-default-constructor-in-gcc-8-and-9-and-not-require-in-gcc |
21 | | SensorDelegateRSSISource() = delete; |
22 | 2 | SensorDelegateRSSISource(RunnerT& runner) : runner(runner) {}; ??0?$SensorDelegateRSSISource@U?$AnalysisRunner@U?$AnalysisDelegateManager@UDummyDistanceDelegate@@@analysis@herald@@U?$AnalysisProviderManager@UFowlerBasicAnalyser@distance@algorithms@analysis@herald@@@23@VRSSI@datatype@3@UDistance@63@@analysis@herald@@@analysis@herald@@QEAA@AEAU?$AnalysisRunner@U?$AnalysisDelegateManager@UDummyDistanceDelegate@@@analysis@herald@@U?$AnalysisProviderManager@UFowlerBasicAnalyser@distance@algorithms@analysis@herald@@@23@VRSSI@datatype@3@UDistance@63@@12@@Z Line | Count | Source | 22 | 1 | SensorDelegateRSSISource(RunnerT& runner) : runner(runner) {}; |
??0?$SensorDelegateRSSISource@U?$AnalysisRunner@U?$AnalysisDelegateManager@UDummyDistanceDelegate@@U?$LoggingAnalysisDelegate@U?$Context@UDefaultPlatformType@herald@@UDummyLoggingSink@@VDummyBluetoothStateManager@@@herald@@UDistance@datatype@2@@analysis@herald@@@analysis@herald@@U?$AnalysisProviderManager@UFowlerBasicAnalyser@distance@algorithms@analysis@herald@@@23@VRSSI@datatype@3@UDistance@63@@analysis@herald@@@analysis@herald@@QEAA@AEAU?$AnalysisRunner@U?$AnalysisDelegateManager@UDummyDistanceDelegate@@U?$LoggingAnalysisDelegate@U?$Context@UDefaultPlatformType@herald@@UDummyLoggingSink@@VDummyBluetoothStateManager@@@herald@@UDistance@datatype@2@@analysis@herald@@@analysis@herald@@U?$AnalysisProviderManager@UFowlerBasicAnalyser@distance@algorithms@analysis@herald@@@23@VRSSI@datatype@3@UDistance@63@@12@@Z Line | Count | Source | 22 | 1 | SensorDelegateRSSISource(RunnerT& runner) : runner(runner) {}; |
|
23 | | ~SensorDelegateRSSISource() = default; |
24 | | |
25 | 8 | void sensor(SensorType sensor, const Proximity& didMeasure, const TargetIdentifier& fromTarget, const PayloadData& withPayload) { |
26 | 8 | if (sensor != SensorType::BLE) return0 ; // guard for BLE RSSI proximity only data |
27 | 8 | runner.template newSample<RSSI>(withPayload.hashCode(),Sample<RSSI>(Date(),RSSI(didMeasure.value))); |
28 | 8 | } ?sensor@?$SensorDelegateRSSISource@U?$AnalysisRunner@U?$AnalysisDelegateManager@UDummyDistanceDelegate@@@analysis@herald@@U?$AnalysisProviderManager@UFowlerBasicAnalyser@distance@algorithms@analysis@herald@@@23@VRSSI@datatype@3@UDistance@63@@analysis@herald@@@analysis@herald@@QEAAXW4SensorType@datatype@3@AEBUProximity@53@AEBVTargetIdentifier@53@AEBVPayloadData@53@@Z Line | Count | Source | 25 | 4 | void sensor(SensorType sensor, const Proximity& didMeasure, const TargetIdentifier& fromTarget, const PayloadData& withPayload) { | 26 | 4 | if (sensor != SensorType::BLE) return0 ; // guard for BLE RSSI proximity only data | 27 | 4 | runner.template newSample<RSSI>(withPayload.hashCode(),Sample<RSSI>(Date(),RSSI(didMeasure.value))); | 28 | 4 | } |
?sensor@?$SensorDelegateRSSISource@U?$AnalysisRunner@U?$AnalysisDelegateManager@UDummyDistanceDelegate@@U?$LoggingAnalysisDelegate@U?$Context@UDefaultPlatformType@herald@@UDummyLoggingSink@@VDummyBluetoothStateManager@@@herald@@UDistance@datatype@2@@analysis@herald@@@analysis@herald@@U?$AnalysisProviderManager@UFowlerBasicAnalyser@distance@algorithms@analysis@herald@@@23@VRSSI@datatype@3@UDistance@63@@analysis@herald@@@analysis@herald@@QEAAXW4SensorType@datatype@3@AEBUProximity@53@AEBVTargetIdentifier@53@AEBVPayloadData@53@@Z Line | Count | Source | 25 | 4 | void sensor(SensorType sensor, const Proximity& didMeasure, const TargetIdentifier& fromTarget, const PayloadData& withPayload) { | 26 | 4 | if (sensor != SensorType::BLE) return0 ; // guard for BLE RSSI proximity only data | 27 | 4 | runner.template newSample<RSSI>(withPayload.hashCode(),Sample<RSSI>(Date(),RSSI(didMeasure.value))); | 28 | 4 | } |
|
29 | | |
30 | | private: |
31 | | RunnerT& runner; // reference to app wide Analysis Runner instance |
32 | | }; |
33 | | |
34 | | } |
35 | | } |
36 | | |
37 | | #endif |